package generator.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import generator.domain.Supplier;
import generator.domain.SysUser;
import generator.service.SupplierService;
import generator.mapper.SupplierMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author 李展鹏
* @description 针对表【t_supplier(药品供货商)】的数据库操作Service实现
* @createDate 2024-04-25 13:57:11
*/
@Service
public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier>
    implements SupplierService{
    @Resource
    SupplierMapper supplierMapper;
    @Override
    public List<Supplier> getSupplieList(String supName, String supCode, Integer pageIndex, Integer pageSize) {
        pageIndex=(pageIndex-1)*pageSize;
        return supplierMapper.getSupplieList(supName,supCode,pageIndex,pageSize);
    }

    @Override
    public int getSupplieCount(String supName, String supCode) {
        return supplierMapper.getSupplieCount(supName,supCode);
    }

    @Override
    public Supplier getSupplierById(Integer id) {
        return supplierMapper.getSupplierById(id);
    }

//    @Override
//    public Boolean add(Supplier supplier) {
//        return supplierMapper.add(supplier);
//    }

}




